home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Language=VBScript CODEPAGE=65001 %> <%' option explicit %> <!--#include file="include/wmsConstants.inc"--> <!--#include file="include/wmsLocStrings.inc"--> <!--#include file="include/wmsCommon.inc"--> <!--#include file="include/wmsServerHash.inc"--> <!--#include file="include/wmsconnect.inc"--> <!--#include file="include/wmsRefresh.inc"--> <!--#include file="include/wmsHeader.inc"--> <!--#include file="include/wmsToolbar.inc"--> <!--#include file="include/wmsError.inc"--> <!--#include file="include/wmsHelp.inc"--> <!--#include file="include/wmsPageBanner.inc"--> <!--#include file="include/wmsTabs.inc"--> <% '+------------------------------------------------------------------------- ' ' Microsoft Windows Media ' Copyright (C) Microsoft Corporation. All rights reserved. ' ' File: Server_Status.asp ' ' Contents: ' '-------------------------------------------------------------------------- ConnectToServer BeginErrorHandling Dim bAllowingConnections Dim bDriveUpdateToTreeView Dim strSinceCounter Dim limStreamingPlayers Dim limPlayerBandwidth Dim dwLastToolbarIndex on error resume next bAllowingConnections = g_objServer.AllowClientsToConnect bDriveUpdateToTreeView = FALSE if ( 0 = strcomp( "true", qs("updateTree"), vbTextCompare ) ) then bDriveUpdateToTreeView = TRUE end if if trim( qs("op") ) <> "" then Select Case trim( qs("op") ) case "Allow" g_objServer.AllowClientsToConnect = 1 bAllowingConnections = TRUE bDriveUpdateToTreeView = TRUE case "Deny" g_objServer.AllowClientsToConnect = 0 bAllowingConnections = FALSE bDriveUpdateToTreeView = TRUE case "resetctrs" g_objServer.PeakCounters.Reset() g_objServer.TotalCounters.Reset() case Else if g_bDebugMode then STOP end if End Select if( bDriveUpdateToTreeView ) then Response.Redirect( "server_status.asp?server=" & g_strQueryStringServer & "&updateTree=true" ) else Response.Redirect( "server_status.asp?server=" & g_strQueryStringServer ) end if end if '//////////////////////////////////////////////////////////////// Function LabelValue( strValue, strLabel ) Dim strTemplate strTemplate = strLabel LabelValue = Server.HTMLEncode( Replace( strTemplate, "___", trim( CStr( strValue ) ), 1 ) ) End Function WriteHTMLHeader( g_strDecodedServerName ) WriteRefreshMetaTag %><link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>"> <script language="JavaScript" src="include/WMSCommon.js"></script> <script language="JavaScript"> <!-- /*@cc_on @*/ <% WriteCommonJSUtils %> /////////////////////////////////////////////////////////////////////// function PrintLocalizedTimestamp( dwUTCDate ) { var dateTimeUTC; dateTimeUTC = new Date( dwUTCDate ); document.write( dateTimeUTC.toLocaleString() ); } ////////////////////////////////////////////////////////////////////////// function UTCToLocal( dwUTCDate ) { <% jsTRY %> PrintLocalizedTimestamp( dwUTCDate ); <% jsCATCH %> } /////////////////////////////////////////////////////////////////////// function ValidateStop() { <% jsTRY %> if( true == window.confirm( "<%= RemoveDangerousCharacters( L_CONFIRMSTOPSERVER_TEXT ) %>" ) ) { <% if( brMSIE = g_dwBrowserType ) then %> document.parentWindow.parent.parent.location = "/wmssecure/admin.asp?server=<%= g_strQueryStringServer %>&serverop=kill"; <% else %> parent.document.location = "/wmssecure/admin.asp?server=<%= g_strQueryStringServer %>&serverop=kill"; <% end if %> } <% jsCATCH %> } --> </script> </head> <body topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" <% if bDriveUpdateToTreeView then %>onLoad="UpdateTreeView();"<% end if %> oncontextmenu="JavaScript:event.cancelBubble=true;return false;"> <% ' Draw the page banner with tabs DrawServerNameBanner L_MONITORTABTITLE_TEXT %> <table bgcolor="#FFFFFF" width="100%" cellspacing="0" cellpadding="0" border="0"> <tr valign="bottom" height="24"> <td> </td> <td> <p> <br> <img src="img\general_16.gif" height="16" width="16" valign="middle"> <span class="smcounterlabel"><%= Server.HTMLEncode( L_GENERAL_TEXT ) %></span><%' ------------------------------ %> </td> </tr> <tr valign=top> <td> </td> <td> <table width="90%" cols="1" cellspacing="0" cellpadding="0" border="1"> <tr> <td> <table width="100%" cellspacing="4" cellpadding="0" border="0"> <tr> <td> </td> <td> <table width=100% cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" nowrap> <span class="smcounter"><%= Server.HTMLEncode( L_LASTCTRRESET_TEXT ) %></span> </td> <td align="right" width="100%" colspan=2> <span class="smcounter"><% strSinceCounter = g_objServer.PeakCounters.CountersStartTime %> <script language="JavaScript"> UTCToLocal( "<%= FormatDateAsUTC( strSinceCounter ) %>" ); </script> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span class="smcounter"> <%= Server.HTMLEncode( L_CPUCOLON_TEXT ) %> </span> </td> <td nowrap align="right" width="100%"> <span class="smcounter"> <%= LabelValue( g_objServer.CPUUtilization, L_PERCENT_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom" height="24"> <td> </td> <td> <p> <br> <img src="img\mediaplayer_16.gif" height="16" width="16" valign="middle"> <span class="smcounterlabel"><%= Server.HTMLEncode( L_CLIENTS_TEXT ) %></span> </td> </tr> <tr valign=top> <td> </td> <td> <table width="90%" cols=1 cellspacing="0" cellpadding="0" border="1"> <tr> <td> <table width="100%" cellspacing="4" cellpadding="0" border="0"> <tr> <td> </td> <td> <table width="100%" cols="3" cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" nowrap> <span class="smcounter"><%= Server.HTMLEncode( L_CURLIMIT_TEXT ) %></span> </td> <td nowrap align="right" width="100%"> <span nowrap class="smcounter"> <% limStreamingPlayers = g_objServer.Limits.ConnectedPlayers if( limStreamingPlayers < 0 ) then Response.Write( Server.HTMLEncode( L_UNLIMITED_TEXT ) ) else Response.Write( LabelValue( limStreamingPlayers, L_PLAYERSLABEL_TEXT ) ) end if %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span nowrap class="smcounter"><%= Server.HTMLEncode( L_PERCENTLIM_TEXT ) %></span> </td> <td align="right" width="100%"> <span nowrap class="smcounter"> <% Dim lConPlayerPercent if( -1 = limStreamingPlayers ) then Response.Write( Server.HTMLEncode( L_UNLIMITED_TEXT ) ) else if( 0 = limStreamingPlayers ) then else lConPlayerPercent = 0 lConPlayerPercent = CSng( g_objServer.CurrentCounters.ConnectedPlayers ) / CSng( limStreamingPlayers ) lConPlayerPercent = CInt( 100 * lConPlayerPercent ) Response.Write( LabelValue( lConPlayerPercent, L_PERCENT_TEXT ) ) end if end if %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span class="smcounter"> <%= Server.HTMLEncode( L_PEAK_TEXT ) %> </span> </td> <td nowrap align="right" width="100%"> <span nowrap class="smcounter"> <%= LabelValue( g_objServer.PeakCounters.ConnectedPlayers, L_PLAYERSLABEL_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align=left nowrap> <span nowrap class="smcounter"><%= Server.HTMLEncode( L_PLAYERSCOLON_TEXT ) %></span> </td> <td align="right" width="100%"> <span nowrap class="smcounter"> <%= LabelValue( g_objServer.CurrentCounters.ConnectedPlayers, L_PLAYERSLABEL_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom" height="24"> <td> </td> <td> <p> <br> <img src="img\limits_16.gif" height="16" width="16" valign="middle"> <span class="smcounterlabel"><%= Server.HTMLEncode( L_BANDWIDTH_TEXT ) %></span><%' ------------------------------ %> </td> </tr> <tr valign=top> <td> </td> <td> <table width="90%" cols=1 cellspacing="0" cellpadding="0" border="1"> <tr> <td> <table width="100%" cellspacing="4" cellpadding="0" border="0"> <tr> <td> </td> <td> <table width=100% cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" nowrap> <span class="smcounter"><%= Server.HTMLEncode( L_CURLIMIT_TEXT ) %></span> </td> <td nowrap align="right" width="100%"> <span nowrap class="smcounter"> <% limPlayerBandwidth = g_objServer.Limits.PlayerBandwidth if( limPlayerBandwidth < 0 ) then Response.Write( Server.HTMLEncode( L_UNLIMITED_TEXT ) ) else Response.Write( LabelValue( limPlayerBandwidth, L_KBITSPERSECLABEL_TEXT ) ) end if %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span class="smcounter"><%= Server.HTMLEncode( L_PERCENTLIM_TEXT ) %></span> </td> <td align="right" width="100%"> <span nowrap class="smcounter"> <% Dim lBWPercent if( -1 = limPlayerBandwidth ) then Response.Write( Server.HTMLEncode( L_UNLIMITED_TEXT ) ) else if( 0 = limPlayerBandwidth ) then else lBWPercent = 0 lBWPercent = g_objServer.CurrentCounters.PlayerAllocatedBandwidth / limPlayerBandwidth lBWPercent = CInt( 100 * lBWPercent ) Response.Write( LabelValue( lBWPercent, L_PERCENT_TEXT ) ) end if end if %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span class="smcounter"> <%= Server.HTMLEncode( L_PEAK_TEXT ) %> </span> </td> <td align="right" width="100%"> <span nowrap class="smcounter"> <%= LabelValue( g_objServer.PeakCounters.PlayerAllocatedBandwidth, L_KBITSPERSECLABEL_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> <tr> <td align="left" nowrap> <span nowrap class="smcounter"><%= Server.HTMLEncode( L_BANDWIDTHALLOCATION_TEXT ) %></span> </td> <td nowrap align="right" width="100%"> <span nowrap class="smcounter"> <%= LabelValue( g_objServer.CurrentCounters.PlayerAllocatedBandwidth, L_KBITSPERSECLABEL_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom" height="24"> <td> </td> <td> <p> <br> <img src="img\inter_advert_16.gif" height="16" width="16" valign="middle"> <span class="smcounterlabel"><%= Server.HTMLEncode( L_ADVERTISING_TEXT ) %></span><%' ------------------------------ %> </td> </tr> <tr valign=top> <td> </td> <td> <table width="90%" cols=1 cellspacing="0" cellpadding="0" border="1"> <tr> <td> <table width="100%" cellspacing="4" cellpadding="0" border="0"> <tr> <td> </td> <td> <table width=100% cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" nowrap> <span class="smcounter"><%= Server.HTMLEncode( L_TOTSERVEDADS_TEXT ) %></span> </td> <td nowrap align="right" width="100%"> <span nowrap class="smcounter"> <%= LabelValue( g_objServer.TotalCounters.Advertisements, L_IMPRESSIONSLABEL_TEXT ) %> </span> </td> </tr> <tr> <td height="4"> </td> <td height="4"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr valign="bottom" height=24> <td> </td> <td> <p> </td> </tr> <tr valign=top> <td> </td> <td> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td> <% ToolbarButtonText ( 0 ) = L_BUTTONSERVERSTOP_TEXT ToolbarButtonImage( 0 ) = IMAGE_STOP ToolbarButtonLink ( 0 ) = "javascript:ValidateStop()" ToolbarButtonAltText( 0 ) = L_STOPSERVER_TEXT ToolbarButtonText ( 1 ) = L_BUTTONALLOWNEWCONNECTIONS_TEXT if bAllowingConnections then ToolbarButtonImage( 1 ) = IMAGE_ALLOWCONNECTIONSG ToolbarButtonLink ( 1 ) = "" else ToolbarButtonImage( 1 ) = IMAGE_ALLOWCONNECTIONS ToolbarButtonLink ( 1 ) = "server_status.asp?server=" & g_strQueryStringServer & "&op=Allow" end if ToolbarButtonAltText( 1 ) = L_ALLOWUCONNECTIONS_TEXT ToolbarButtonText ( 2 ) = L_BUTTONDENYNEWCONNECTIONS_TEXT if bAllowingConnections then ToolbarButtonImage( 2 ) = IMAGE_DENYCONNECTIONS ToolbarButtonLink ( 2 ) = "server_status.asp?server=" & g_strQueryStringServer & "&op=Deny" else ToolbarButtonImage( 2 ) = IMAGE_DENYCONNECTIONSG ToolbarButtonLink ( 2 ) = "" end if ToolbarButtonAltText( 2 ) = L_DENYUCONNECTIONS_TEXT ToolbarButtonText ( 3 ) = L_BUTTONRESETPEAKS_TEXT ToolbarButtonImage( 3 ) = IMAGE_RESETPEAKS ToolbarButtonLink ( 3 ) = "server_status.asp?server=" & g_strQueryStringServer & "&op=resetctrs" ToolbarButtonAltText( 3 ) = L_RESETPEAKS_TEXT dwLastToolbarIndex = 3 if( Session( "ShowServerList" ) ) then dwLastToolbarIndex = dwLastToolbarIndex + 1 ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONRETURNTOSERVERLIST_TEXT ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_SERVERLIST ToolbarButtonLink ( dwLastToolbarIndex ) = SERVERSLIST_PATH ToolbarButtonAltText( dwLastToolbarIndex ) = L_RETURNTOSL_TEXT end if dwLastToolbarIndex = dwLastToolbarIndex + 1 ToolbarButtonText ( dwLastToolbarIndex ) = L_BUTTONHELP_TEXT ToolbarButtonImage( dwLastToolbarIndex ) = IMAGE_HELP ToolbarButtonLink ( dwLastToolbarIndex ) = HELPTOKEN ToolbarButtonAltText( dwLastToolbarIndex ) = L_HELPALT_TEXT ToolbarHelpURL = H_SERVERSTATUSHELPTOPIC ToolbarNesting = H_SERVERLEVEL DrawToolbar FALSE, ( dwLastToolbarIndex + 1 ) %> </td> </tr> </table> </td> </tr> </table> <% DrawRefreshControl FALSE DrawCopyrightInfo DrawStdFooter %> </body> </html> <% LatchCurrentPage "server_status.asp", qs EndErrorHandling( "server_status.asp" ) on error resume next WMSServerHashASPCleanup WMSConnectASPCleanup %>